ok how big can you make a trigger?
local.trig setsize ( -60 -60 -60 ) ( 60 60 60 ) //adapt the size
would 1 big trigger be better than a bunch of small 1's?
ok how big can you make a trigger?
local.trig setsize ( -60 -60 -60 ) ( 60 60 60 ) //adapt the size
would 1 big trigger be better than a bunch of small 1's?
ok made this but it don't matter where I am on map it takes the weapons...lol
Did the same thing for axis and it works fine.Code:main: level.corona = spawn script_model level.corona model "lights/lightbulb_caged_red-lit.tik" level.corona.origin = ( -1392 335 -416 ) level.corona.angles = ( 0 -90 0 ) level.corona light 1 0 0 100 level.corona notsolid level.corona scale 1.0 wait 90 thread take take: local.trig3 = spawn trigger_multiple local.trig3.origin = ( -1392 335 -416 ) //here the origin local.trig3 setsize ( -10 -10 -10 ) ( 10 10 10 ) //adapt the size local.trig3 setthread taken taken: local.player = parm.other if (local.player.dmteam == "allies") { local.player take models/weapons/springfield.tik local.player take models/weapons/kar98.tik local.player take models/weapons/kar98sniper.tik local.player take models/weapons/m2frag_grenade.tik local.player take models/weapons/steilhandgranate.tik } end
Im not too sure but its a good habit to add ends to the threads aswell , makes it nice and neat
Code:main: level.corona = spawn script_model level.corona model "lights/lightbulb_caged_red-lit.tik" level.corona.origin = ( -1392 335 -416 ) level.corona.angles = ( 0 -90 0 ) level.corona light 1 0 0 100 level.corona notsolid level.corona scale 1.0 wait 90 thread take end take: local.trig3 = spawn trigger_multiple local.trig3.origin = ( -1392 335 -416 ) //here the origin local.trig3 setsize ( -10 -10 -10 ) ( 10 10 10 ) //adapt the size local.trig3 setthread taken end taken: local.player = parm.other if (local.player.dmteam == "allies") { local.player take models/weapons/springfield.tik local.player take models/weapons/kar98.tik local.player take models/weapons/kar98sniper.tik local.player take models/weapons/m2frag_grenade.tik local.player take models/weapons/steilhandgranate.tik } end
Purple's Playground
OBJ : 103.29.85.127:12203
xfire: purpleelephant1au
email: purpleelephant1au@gmail.com
skydrive: PurpleElephantSkydrive
cool that worked, wonder why the axis team didn't do that? I changed both scr's anyway.
Yeah tell that to my wife![]()
Ok got it all working I just added it to map script. Next is to make it on or off in console I need to check for the map and the cvar for script. set punish 1/0
so I did this 1st
I'm not sure how to check for more than 1 cvar. it works that way on V2 but how do you see if it running on another map...lol I want to make it a pk3 so people don't know how won't have to mess with map scr.Code:level.punish = getcvar "punish" if(level.punish == "1") { thread spawn } end it works but this way it will always be on or off no matter what map is running? so I thought this might work going by the if...else ... statement from the message post...lol level.map = getcvar "obj_team2" if(level.obj_team2 == "0") { end } else level.punish = getcvar "punish" // or exec global punish.scr here maybe instead of checking cvar if(level.punish == "1") { thread spawn } end
Last edited by easymeat; June 3rd, 2014 at 12:35 PM.
well have a big problem....after the allies trigger activate they never turn off...lol
Not sure what you are doing there but the cvar 'obj_team2' does not exist as far as I know. Even if it did, you're saving its value in the variable
'level.map' but you check the variable 'level.obj_team2' instead (which also does not exist). If you want to know the name of the current map
use the 'mapname' cvar and check for value 'obj/obj_team2'.
If you're checking more than one value, it's probably better to use a switch statement:Code:if (getcvar("mapname") == "obj/obj_team2") { // do something }
Code:switch(getcvar("mapname")) { case "obj/obj_team2": // do something break; // break out of switch, otherwise the cases below will be executed as well. case "dm/mohdm1": // do something break; default: // is optional and handles all remaining cases // do something break; }
Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.
ok thanks Sor the 1st code will work fine. I have a script I want to exec from mike torso but I only want to run on that map. I just didn't obj_team2 didn't exist...lol.
is what I need to do. Now can you exec a scr from the do something place?Code:if (getcvar("mapname") == "obj/obj_team2") { thread punish // do something } end punish: level.punish = getcvar "punish" if(level.punish == "1") { thread axis } end
if(level.punish == "1")
{
exec global/my.scr
}
Wouldn't it be easier to just do
or you can do something like this...Code:if(getcvar("punish") == "1") { thread axis } end
You have a lot of redundant code that you don't need and it doesn't necessarily simplify your process.. I'm hoping my code is correct though because I'm definitely not as proficient in scr's as Sor or Purple Elephant1au. hahaCode:if(getcvar("mapname") == "obj/obj_team2") { if(getcvar("punish") == "1") { thread axis } } end